﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Phoenix.AppCode.Entities;
using Phoenix.AppCode.Data;
using System.Data;

namespace Phoenix.AppCode.Bussiness
{
    public class MenuListService
    {
        public MenuListService() 
        {
            //
            // TODO: Add constructor logic here
            //    
        }

        #region Backend Method
        /// <summary>
        /// Create 
        /// </summary>
        /// <param name="menulist"></param>
        public static void Create(MenuList menulist)
        {
            MenuListDAO menulistDAO = new MenuListDAO();
            menulistDAO.Create(menulist);
        }

        /// <summary>
        /// Edit
        /// </summary>
        /// <param name="menulist"></param>
        public static void Edit(MenuList menulist)
        {
            MenuListDAO menulistDAO = new MenuListDAO();
            menulistDAO.Edit(menulist);
        }

        /// <summary>
        /// On/Off
        /// </summary>
        /// <param name="menulist"></param>
        public static void OnOff(MenuList menulist)
        {
            MenuListDAO menulistDAO = new MenuListDAO();
            menulistDAO.OnOff(menulist);
        }

        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="menulist"></param>
        public static void Delete(MenuList menulist)
        {
            MenuListDAO menulistDAO = new MenuListDAO();
            menulistDAO.Delete(menulist);
        }

        /// <summary>
        /// Show category all
        /// </summary>
        /// <param name="language"></param>
        /// <returns></returns>
        //public static DataTable MenuListList(string language)
        //{
        //    MenuListDAO menulistDAO = new MenuListDAO();
        //    return menulistDAO.MenuListList(language);
        //}

        /// <summary>
        /// Show all
        /// </summary>
        /// <param name="language"></param>
        /// <returns></returns>
        public static DataTable MenuListListByBeFe(int menubackfrontend, string language)
        {
            MenuListDAO menulistDAO = new MenuListDAO();
            return menulistDAO.MenuListListByBeFe(menubackfrontend,language);
        }

        /// <summary>
        /// Show data by ID
        /// </summary>
        /// <param name="idmenulist"></param>
        /// <returns></returns>
        public static DataTable MenuListList_GetByID(int idmenulist)
        {
            MenuListDAO menulistDAO = new MenuListDAO();
            return menulistDAO.MenuListEdit_GetByID(idmenulist);
        }

        /// <summary>
        /// Get ID to edit or delete 
        /// </summary>
        /// <param name="idmenulist"></param>
        /// <returns></returns>
        public static MenuList GetMenuListByID(int idmenulist)
        {
            MenuListDAO menulistDAO = new MenuListDAO();
            return menulistDAO.GetMenuListByID(idmenulist);
        }
        #endregion
    }
}